// 订单服务
const mongoose = require('mongoose');
const shopsModel = require('./shopsModel')
const servicesModel = require('./servicesModel')
// const usersModel = require('./usersModle');
// const adminModel = require('./adminModle');
const orderServicesSchema = new mongoose.Schema({
    time: String, // 下单时间
	orderTime: String, // 预约时间
    state: String, // 订单服务状态）待付款/待完成/待评价/已完成）


    serviceId:{
        type: mongoose.Schema.Types.ObjectId,
        ref: "servicesModel"
    }, // 所属订单的服务id 

	userId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "usersModel"
    }, //	订单服务所属用户id
    

	adminId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "adminModel"
    }, // 所属门店管理员id
	shopId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "shopsModel"
    }, // 所属门店id
});
module.exports = mongoose.model('orderServicesModel',orderServicesSchema,'orderServices');
